#ifndef __MAIL_H__
#define __MAIL_H__

#include <stdio.h>
#include <glib.h>
#include "mime.h"
#include "mailhead.h"
#include "buffer.h"
#include "xdebug.h"
#include "common.h"

typedef struct Mail
{
    BUFFER        *buffer;

    MAILHEAD      *MailHead;
    GSList        *MailMime;
    
    char          *basepath;
}MAIL;

MAIL*   mail_new(const char*, const char*);
void    mail_delete(MAIL*);
void    mail_clear(MAIL*);
int     mail_parse(MAIL*, int is_parse_data);
int     mail_string(MAIL*, char*, int);

#endif

